home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 February / maximum-cd-2012-02.iso / DiscContents / TheWagerSetup1.2.exe / Assets / Scripts / [9].lua < prev    next >
Encoding:
Text File  |  2011-02-26  |  1.3 KB  |  40 lines

  1. -- Script [9]
  2. Starting = 0;
  3. SeaEvent = 0;
  4.  
  5. function KillRandomCrewMember ()
  6.   if CrewCount >= 1 then
  7.  
  8.     CrewID = math.random(0, CrewCount);
  9.   
  10.     CrewName = GetCrewName(CrewID);
  11.  
  12.     KillCrew(CrewID);
  13.  
  14.     return CrewName;
  15.   end
  16. end
  17.  
  18. DeadCrew = "";
  19. for i = 1, 2 do
  20.   CrewName = KillRandomCrewMember();
  21.  
  22.   if CrewName ~= "" then
  23.     DeadCrew = DeadCrew .. " and " .. CrewName;
  24.   end
  25. end
  26.  
  27. if DeadCrew ~= "" then
  28.   
  29.   Message = "You approach the pot, at the last moment lunging forward and tipping the thing towards a group of suddenly scattering cannibals. Your crew leap into action, but you are heavily outnumbered here at the camp, " .. DeadCrew .. " are brutally slaughtered in your efforts to escape. Finally seeing a way out, you run back to your ship as fast as your feet can carry you and spend some time tending to your wounds.";
  30.  
  31. else
  32.  
  33.   Message = "You approach the pot, at the last moment lunging forward and tipping the thing towards a group of suddenly scattering cannibals. Your crew leap into action, but you are heavily outnumbered here at the camp. Finally seeing a way out, you run back to your ship as fast as your feet can carry you and spend some time tending to your wounds.";
  34.  
  35. end
  36.  
  37. ShowStoryText(Message);
  38.  
  39. AddDays(1);
  40. AddCaptainsLog("Escaped from a tribe of savage cannibals but not without a struggle.");